﻿Imports PhDir.Repository.Department

Namespace Repository

    Public Class DepartmentRepository

        Friend Sub New()
            Me.SearchDepartmentById = New SearchDepartmentById()
            Me.SelectAllDepartments = New SelectAllDepartments()
        End Sub

        Private Property SearchDepartmentById As ISearch(Of Model.Department, String)
        Private Property SelectAllDepartments As ISelectAll(Of Model.Department)

        Public Function SelectAll() As List(Of Model.Department)
            Return Me.SelectAllDepartments.SelectAll()
        End Function

        Public Function SearchById(ByVal departmentId As String) As List(Of Model.Department)
            Return Me.SearchDepartmentById.Search(departmentId)
        End Function

    End Class

End Namespace
